@extends('layouts.home.layout')
@section('content')
    @include('layouts.home._nav')

    <div class="calc-entry" style="margin-top: 20px;">
        <ul class="am-cf">
            <li class="ce-li cel1"><a href="/main/mortgage">购房贷款工具</a></li>
            <li class="ce-li cel2"><a href="/main/card">信用卡分期</a></li>
            {{--<li class="ce-li cel3"><a href="/main/evaluate">贷款能力评估</a></li>--}}
            <li class="ce-li cel4 cur"><a href="/apply/cardstepone">信用卡快捷推荐</a></li>
        </ul>
    </div>

    <div class="financial">
        <div class="financial_top">
            <div class="financial_title">
                <img src="{{asset('home')}}/images/jrlogz_03.jpg" />
                <div>
                    <h1>信用卡快捷推荐</h1>
                    <p>轻松办卡快速拿卡</p>
                </div>
            </div><!--financial_title-->
        </div><!--financial_top-->

        <div class="jrbz"><img src="{{asset('home')}}/images/bz3_03.jpg" width="831" height="39" /></div>
        <div class="bankbox">
            <h1>您好！您的信息已成功提交，我们将尽快安排工作人员跟进信用卡申请事宜。请保持手机畅通！</h1>
           {{-- <img src="{{asset('home')}}/images/yinhangz_07.jpg" width="40" class="arrowbtn"/>--}}
            {{--<form action="{{url('apply/cardstepthree')}}" name="threeForm" id="threeForm" method="post">
                <input type="hidden" name="recordid" value="{{$recordid}}">
                <ul class="tjbank">
                  @foreach($cards as $key=>$val)
                    <li>
                        <input type="radio" name="cardid" value="{{$val->id}}"/>
                        <div><img src="{{asset('home')}}{{$val->image}}" /></div>
                    </li>
                  @endforeach
                </ul>
                <button type="button" class="bankbtn subBtn">去申请</button>
            </form>--}}
        </div>
    </div><!--financial-->





    <script>
        $(document).ready(function () {
            var twooptions = {
                success: function (data) {
                    $(".subBtn").attr('disabled',false);
                    layer.msg(data.message);
                    if(data.code=='0000'){
                        window.location.href='http://'+data.cardurl;
                    }
                }
            };
            $(".subBtn").click(function () {
                var fm=document.forms['threeForm'];// HTML DOM 通过form 元素的name值获取
                //
                if(fm.cardid.value==''){
                    layer.msg('请选择要申请的银行');
                    return false;
                }
                console.log(fm.cardid.value);
                console.log('sas');
                $(".subBtn").attr('disabled',true);//禁用按钮
                $("#threeForm").ajaxSubmit(twooptions);
            });
        });

    </script>
@endsection
